/**
 * TODO JAVADOC
 */
package com.encon.projecttracker.client;

import java.util.List;

import org.springframework.security.annotation.Secured;

import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.ui.MenuBar;

/**
 *TODO JAVADOC
 *
 * @author bugg
 *
 */
public class ToolBarPanel extends MenuBar{

	public ToolBarPanel() {
		super();

		init();
	}
	
	private void init(){
			}
	
	public void createMenuBar(){
		Command command = new Command(){

			public void execute() {
				// TODO Auto-generated method stub
				
			}
			
		};

		this.addItem("Comapnies", command);
		this.addItem("Projects", command);
		this.addItem("Tasks", command);
		this.addItem("Calendar", command);
		this.addItem("Files", command);
		this.addItem("Contacts", command);
		this.addItem("Forums", command);
		this.addItem("Tickets", command);
		List<String> mylist = Projecttracker.getUserRoles();
		if (mylist.contains("ROLE_ADMIN"))
		{
		this.addItem("User Admin", command);
		this.addItem("System Admin", command);
		}
	
	}
}
